//
//  WGQConsultationImagesCollectionCell.m
//  MaYi
//
//  Created by 小破夕 on 2018/9/9.
//  Copyright © 2018年 JUMI. All rights reserved.
//

#import "WGQConsultationImagesCollectionCell.h"

@interface WGQConsultationImagesCollectionCell ()

@property (nonatomic,strong) UIImageView * imageView;

@end

@implementation WGQConsultationImagesCollectionCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.contentView.backgroundColor = FFColor(0xebebeb);
        [self addSubViews];
    }
    return self;
}

- (void)addSubViews
{
    self.imageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.imageView];
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make)
    {
        make.left.equalTo(self.contentView.mas_left);
        make.right.equalTo(self.contentView.mas_right);
        make.top.equalTo(self.contentView.mas_top);
        make.bottom.equalTo(self.contentView.mas_bottom);
    }];
}

- (void)setObject:(id)object
{
    if ([object isKindOfClass:[NSString class]])
    {
        [self.imageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",IMG_OSS,object]]];
    }
}

@end
